<script language="javascript">

function check()
{
	if(document.socket_form.prgname.value.length == 0)
	{
		alert("请选择频道！");
		document.socket_form.prgname.focus();
		return false;
	}
	if(document.socket_form.schedule.value.length == 0)
	{
		alert("请输入任务执行时间！");
		document.socket_form.schedule.focus();
		return false;
	}
	if(document.socket_form.gain.value.length == 0)
	{
		alert("请选择音频能级！");
		document.socket_form.gain.focus();
		return false;
	}
	if(document.socket_form.chnserial.value==""){
		alert('请选择频道');
		return false;
	}
	return true;
}
</script>
<table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" class="table_bg">
<form action='<!--{$_acurl}-->' method="post" name="socket_form">
	  <tr>
		 <td colspan="2" class="td_title">音频定时设定&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         		<b>[<a href="<!--{url controller='time' action='add'}-->">添加频道更改</a>]</b>
                <b>[<a href="<!--{url controller='time' action='weekadd'}-->">添加每周频道更改</a>]</b>
                
                &nbsp;┇&nbsp;
                <!--
                <b>[<a style="color:red" href="<!--{url controller='time' action='alladd'}-->">添加每天整体设备更改</a>]</b>
                <b>[<a style="color:red" href="<!--{url controller='time' action='allweekadd'}-->">添加每周整体设备更改</a>]</b>-->
         </td>
	  </tr>
	<tr>
	  <td width="14%" class="td_bg_blue"><strong>频道</strong></td>
      <td width="86%" class="td_bg_white">
		<select name="chnserial" id="prgname">
        	<option value="">请选择...</option>
			<!--{foreach from=$chninfo item=chninfo}-->
            	<option value="<!--{$chninfo.serial}-->" <!--{if $DataList.chnserial==$chninfo.serial}-->selected="selected"<!--{/if}--> ><!--{$chninfo.prgname}--></option>
            <!--{/foreach}-->
		</select>
	
	  </td>
	</tr>
	<tr>
	  <td width="14%" class="td_bg_blue"><strong>任务执行时间</strong></td>
      <td width="86%" class="td_bg_white">
      每个星期:
      <select name="week">
      	<!--{foreach from=$week item=week}-->
        	<option value="<!--{$week}-->" <!--{if $week==$DataList.week}-->selected="selected"<!--{/if}--> ><!--{$week}--></option>
        <!--{/foreach}-->
      </select>
      小时:
      <select name="hour">
		<!--{foreach from=$hour item=hour}-->
        	<option value="<!--{$hour}-->" <!--{if $hour==$DataList.hour}-->selected="selected"<!--{/if}-->><!--{$hour}--></option>
        <!--{/foreach}-->
      </select>
      分钟:
      <select name="minute">
      	<!--{foreach from=$minute item=minute}-->
        	<option value="<!--{$minute}-->" <!--{if $minute==$DataList.minute}-->selected="selected"<!--{/if}-->><!--{$minute}--></option>
        <!--{/foreach}-->
      </select>
	  </td>
	</tr>
	<tr>
	  <td width="14%" class="td_bg_blue"><strong>音频能级</strong></td>
      <td width="86%" class="td_bg_white">
		<select name="gain">
        	<!--{html_options options=$gainArray selected=$DataList.gain}-->
        </select>
	
	  </td>
	</tr>
	<tr>
	  <td width="14%" class="td_bg_blue"><strong>任务描述</strong></td>
      <td width="86%" class="td_bg_white">
		<textarea name='schedule_desc' cols='30' rows='3'><!--{$DataList.schedule_desc}--></textarea>
	  </td>
	</tr>


  <tr align="center">
	 <td colspan="2" class="td_bg_white" height="35">
       <input type="button" value="返回上一步" class="button_bg" onclick="location.href='<!--{url controller='time' action='index'}-->'" />
       <input type="submit" name="op" value="提交" class="button_bg" onClick="return check();">
	   <!--{if $op=='m'}-->
       <input name="serial" type="hidden" id="serial" value="<!--{$DataList.serial}-->">
	   <!--{/if}-->
	 </td>
  </tr> 
  </form>
</table>

